#ifndef NOTICE_H
#define NOTICE_H
#include "BaseEntity.h"

#include <QJsonObject>
#include <QList>
#include <QString>

class Notice : public BaseEntity{
public:
   qlonglong noticeId;
   QString noticeTitle;
   QString noticeType;
   QString noticeContent;
   QString status;

   QJsonObject toJson() const {
       QJsonObject json;
       json["noticeId"] = noticeId;
       json["noticeTitle"] = noticeTitle;
       json["noticeType"] = noticeType;
       json["noticeContent"] = noticeContent;
       json["status"] = status;
       json["searchValue"] = searchValue;
       json["createBy"] = createBy;
       json["createTime"] = createTime;
       json["updateBy"] = updateBy;
       json["updateTime"] = updateTime;
       json["remark"] = remark;
       return json;
   }

   static Notice toNotice(const QJsonObject& json) {
       Notice notice;
       notice.noticeId = json["noticeId"].toVariant().toLongLong();
       notice.noticeTitle = json["noticeTitle"].toString();
       notice.noticeType = json["noticeType"].toString();
       notice.noticeContent = json["noticeContent"].toString();
       notice.status = json["status"].toString();
       notice.searchValue = json["searchValue"].toString();
       notice.createBy = json["createBy"].toString();
       notice.createTime = json["createTime"].toString();
       notice.updateBy = json["updateBy"].toString();
       notice.updateTime = json["updateTime"].toString();
       notice.remark = json["remark"].toString();
       return notice;
   }
};



#endif // NOTICE_H
